package com.open4cn.simulator.core.device;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author yinxiaopeng
 * @version 1.0.0
 * @company 致景科技
 * @department 飞梭BU/研发
 * @description 设备参数
 * @Email yinxiaopeng@zj.tech
 * @date 2022-04-03 16:37
 */
public class DeviceParameters implements Serializable {

    // 自定义设备id
    private String id;

    // 自定义设备名称
    private String name;

    // 设备品牌
    private String brand;

    // 设备型号
    private String model;

    // 设备参数
    private Map<String, Object> parameters = new HashMap<>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public void appendOrCover(String key, Object value) {
        parameters.put(key, value);
    }

    public Object get(String key) {
        return parameters.get(key);
    }

    public String getString(String key) {
        return (String) parameters.get(key);
    }

    public Integer getInteger(String key) {
        return (Integer) parameters.get(key);
    }

}
